package com.itbaima.pojo.VO;


import com.fasterxml.jackson.annotation.JsonFormat;
import jakarta.persistence.Column;
import jakarta.persistence.Table;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;


@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "hr_archive")
public class HrArchiveVO {

    private Integer id; // 表ID，自增主键

    @Column(name = "department_level1_id", nullable = false)
    private Integer department_level1_id; // 一级部门ID

    @Column(name = "department_level2_id")
    private Integer department_level2_id; // 二级部门ID，可为空

    @Column(name = "department_level3_id")
    private Integer department_level3_id; // 三级部门ID，可为空

    @Column(name = "department_name", nullable = false, length = 100)
    private String department_name; // 所属部门名称

    @Column(name = "department_id", nullable = false)
    private Integer department_id; // 所属部门ID

    @Column(name = "name", nullable = false, length = 50)
    private String name; // 姓名

    @Column(name = "gender", nullable = false)
    private Integer gender; // 性别：1=男，2=女

    @Column(name = "age", nullable = false)
    private Integer age; // 年龄，限制范围：1~99

    @Column(name = "phone", length = 15)
    private String phone; // 电话，可为空

    @Column(name = "id_card", nullable = false, unique = true, length = 18)
    private String id_card; // 身份证号码，长度18，唯一

    @Column(name = "salary", nullable = false, precision = 10, scale = 2)
    private Integer salary; // 薪酬标准

    @Column(name = "bank_name", nullable = false, length = 100)
    private String bank_name; // 开户银行

    @Column(name = "bank_account", nullable = false, length = 50)
    private String bank_account; // 银行账号

    @Column(name = "personal_description")
    private String personal_description; // 个人介绍，可为空

    @Column(name = "remarks")
    private String remarks; // 备注，可为空

    @Column(name = "registrar", nullable = false, length = 50)
    private String registrar; // 登记人

    @Column(name = "registrar_id", nullable = false)
    private Integer registrar_id;

    @Column(name = "registration_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") // 格式化时间
    private LocalDateTime registration_time; // 创建时间，可为空

    @Column(name = "archive_code", nullable = false, unique = true, length = 50)
    private String archive_code; // 档案编号，唯一

}
